import time

def print_run_time(fun):
    def wrapper(*args,**kw):
        start = time.time()
        fun(*args,**kw)#可变参数，关键字参数
        end = time.time()
        print('运行时间：' + str(end-start))
    return wrapper

@print_run_time
def f1(fun_name1,fun_name2):
    print(fun_name1)
    print(fun_name2)
    count = 1
    for i in range(1000000):
        count += 1

@print_run_time
def f2(fun_name1):
    print(fun_name1)
    count = 1
    for i in range(1000000):
        count *= 1

@print_run_time
def f3(fun_name1,fun_name2,**kw):
    print(fun_name1)
    print(fun_name2)
    print(kw)
    count = 1
    for i in range(1000000):
        count += 1

f1("f1","pos1")
f2('f2')
f3('f3','pos3',a=1,b=2,c=3)